<#include "../common/layout/__mainlayout.html">
<#include "../common/__pagination.html">

<#assign pageBreadCrumbs>
    <li class="active"><a href="#">系统管理</a></li>
    <li class="active">登录日志</li>
</#assign>

<#assign pageCss>
    <!-- page specific plugin styles -->
    <link rel="stylesheet"
          href="${contextPath}/static/admin/assets/css/bootstrap-datetimepicker.css" />
</#assign>

<#assign pageJavascript>
    <script type="text/javascript">
        $(document).ready(function(){
            $(".date-picker").datetimepicker({
                language : 'zh-CN',
                autoclose: true,
                todayHighlight: true
            });
        });

        function page(pageNum) {
            $("#page").val(pageNum);
            $("#searchForm").submit();
        }
    </script>
</#assign>

    <@mainlayout pageBreadCrumbs=pageBreadCrumbs pageCss=pageCss pageJavascript=pageJavascript currentMenu="systemFlag-loginLogFlag">

<div class="row">
    <div class="col-xs-12">
        <form id="searchForm" class="form-search form-inline" method="post">
            <input id="page" name="page" type="hidden"/>
            <label>用户名:</label><input type="text" name="user.username" class="input-sm" value="${user.username!}"/>&nbsp;
            <label>登录时间:</label>
            <input class="date-picker input-sm" name="startTime" value="${startTime!}"
                   type="text" data-date-format="YYYY-MM-DD HH:mm:ss" />-<input class="date-picker input-sm" name="endTime" value="${endTime!}"
                   type="text" data-date-format="YYYY-MM-DD HH:mm:ss" />
            <input type="submit" class="btn btn-sm btn-primary" value="查询"/>
        </form>
        <table id="contentTable" class="table table-striped table-bordered table-hover">
            <thead>
                <tr>
                    <th width="40" align="center" >序号</th>
                    <th width="150" align="left" >用户名</th>
                    <th width="150" align="left" >昵称</th>
                    <th width="150" align="left" >姓名</th>
                    <th width="150" align="center" >登陆时间</th>
                    <th width="150" align="center" >退出时间</th>
                    <th width="150" align="center" >登陆IP</th>
                </tr>
            </thead>

            <tbody>
            <#list pageList.list as loginLog>
                <tr>
                    <td>${loginLog.id!}</td>
                    <td>${loginLog.username!}</td>
                    <td>${loginLog.nickname!}</td>
                    <td>${loginLog.name!}</td>
                    <td>${loginLog.login_time!}</td>
                    <td>${loginLog.logout_time!}</td>
                    <td>${loginLog.login_ip!}</td>
                </tr>
            </#list>
            </tbody>
        </table>
        <@pagination pageList!/>
    </div>
</div>

</@mainlayout>